package lesson3.slides.math;

import java.math.BigDecimal;


public class Decimals {
  public static void main(String [] args) {
    BigDecimal oneHundred = new BigDecimal(100L);
    BigDecimal bd1 = new BigDecimal("1212131415161734333")
      .divide(oneHundred);
    BigDecimal bd2 = new BigDecimal("45131212131415161333")
      .divide(oneHundred);

    BigDecimal bd3 = bd1.add(bd2);

    System.out.println("BigDecimal sum is " + bd3);
    System.out.println("double sum is : "+
     (12121314151617343.33D + 451312121314151613.33D));  
    }
}

